#pragma once

#include "AnimationEvent.h"
#include <OgreSceneManager.h>
#include <OgreParticleSystem.h>
#include <OgreParticleEmitter.h>

class ShockWave:public AnimationEvent {

private:
	Ogre::SceneManager * _mScene;
	Ogre::ParticleSystem * _dustNear;
	Ogre::ParticleSystem * _dustFar;
	Ogre::SceneNode * _dustNodeNear;
	Ogre::SceneNode * _dustNodeFar;
	Ogre::Real _playerDistanceFromCenter;
	Ogre::Real startingAngle;
	Ogre::String shockWaveFile;
	Ogre::Real shockHeight;
	Ogre::Real shockSpeed;
	bool _directionChanged;
	bool _started;

public:
	static Ogre::Real systemName;

public:
	ShockWave(Ogre::SceneManager * mScene, Ogre::String file = "Examples/Dust", Ogre::Real shockHeight = 250, Ogre::Real shockSpeed = 1200);
	virtual ~ShockWave(void);

	void entrega();

	virtual void startEvent();
	virtual void prepareEvent();
	virtual void restartEvent();
	Ogre::Real getParticleDistanceFromCenter();
	Ogre::Real ShockWave::getSquaredParticleDistanceFromCenter();
	void ShockWave::setStartingAngle(Ogre::Radian rad);

	virtual bool hasStarted();

	virtual void update(float deltaTime);

	virtual void quit();
};